<?php

session_start();
include ("func/func.php");
include ("func/sql.php");

$uin=(int) inputclean ($_GET['uin']);
@$res = mysql_query("SELECT avatar, bban FROM geo.uin WHERE uin = ".$uin);
@$row = mysql_fetch_row($res);
  header("Content-type: image/jpg");
  if ($row[0] && $row[1]<time())
        echo $row[0]; 
  else {
        $image = ImageCreateFromGif('img/null.jpg');
        imagePng($image);
        imageDestroy($image);
  }
?>
